TI_GDT equ  0                                               ;从这里开始三步是在定义显存段段描述符的选择子
RPL0  equ   0
RPL1  equ   1
SELECTOR_VIDEO equ (0x0003<<3) + TI_GDT + RPL1
SELECTOR_DATA equ (0x0002<<3) + TI_GDT + RPL0



[bits 32]
section .text

global guest_display_screen
guest_display_screen:
	pushad

        mov ax, SELECTOR_VIDEO
        mov gs, ax
        mov ax, SELECTOR_DATA
	mov ds, ax

	mov ecx,  33
	mov esi, 0
	.Circular_Zero:
	      mov byte [gs:0x140 + esi], ' '
	      mov byte [gs:0x140 + esi + 1], 0x77
	      mov byte [gs:0x500 + esi], ' '
	      mov byte [gs:0x500 + esi + 1], 0x77
	      add esi, 2
	      loop .Circular_Zero

	mov ecx, 6
	mov esi, 0
	.Circular_Two:
	     mov byte [gs:0x1e0 + esi], ' '
	     mov byte [gs:0x1e0 + esi + 1], 0x77
	     mov byte [gs:0x220 + esi], ' '
	     mov byte [gs:0x220 + esi + 1], 0x77
	     add esi, 0xa0
	     loop .Circular_Two


    	popad
	ret

